package com.chance.cc.crawler.development.command.schedule.baufortune;

import com.chance.cc.crawler.development.command.schedule.CrawlerJobScheduleCommand;

/**
 * @Author Zhao.Hhuan
 * @Date Create in 2020/12/14 13:54
 * @Description
 *      紫荆财智
 **/
public class BaufortuneCrawlerJobSchedule {


    private static CrawlerJobScheduleCommand crawlerJobScheduleCommand =
            new CrawlerJobScheduleCommand("192.168.1.215",9589);


    public static void main(String[] args) {

//        deleteCrawlerJob("baufortune-realtime-cron");
        repubflishCrawlerJobInfo("baufortune-realtime-cron");

    }

    /**
     * 重新发布调度
     * @param triggerKey
     */
    public static void repubflishCrawlerJobInfo(String triggerKey){
        crawlerJobScheduleCommand.republishCrawlerJob(triggerKey,"crawler_dev_host");
    }

    /**
     * 发布调度
     * @param triggerKey
     */
    public static void publishCrawlerJobInfo(String triggerKey){
        crawlerJobScheduleCommand.publishCrawlerJob(triggerKey,"crawler_dev_host");
    }

    /**
     * 去除调度
     * @param triggerKey
     */
    public static void deleteCrawlerJob(String triggerKey){
        crawlerJobScheduleCommand.deleteCrawlerJob(triggerKey,"crawler_dev_host");
    }

}
